Passed
Pull Request — master (#37)
by
unknown
03:48
created

  A

Complexity

Conditions 1

Size

Total Lines 15
Code Lines 14

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 14
dl 0
loc 15
rs 9.7
c 0
b 0
f 0
cc 1
1
import { DependencyNode, NodeSelection } from '../../components/types';
2
import { Selection } from 'd3-selection';
3
import { ElementColors, ElementIds } from '../../utils/AppConsts';
4
5
export function createHighlightBackground(
6
    svgContainer: NodeSelection<SVGGElement>
7
): Selection<SVGRectElement, DependencyNode, Element, HTMLElement> {
8
    return svgContainer
9
        .append('rect')
10
        .attr('id', ElementIds.HIGHLIGHT_BACKGROUND)
11
        .attr('width', 0)
12
        .attr('height', 0)
13
        .attr('x', 0)
14
        .attr('y', 0)
15
        .attr('rx', 5)
16
        .attr('ry', 5)
17
        .attr('fill', ElementColors.HIGHLIGHT_BACKGROUND)
18
        .style('opacity', 0);
19
}
20